<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@include file="../../include/taglib.jsp"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html>
<html>
<head>
<%@include file="../../include/inhead.jsp"%>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
<meta name="renderer" content="webkit" />
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1" >
<meta name="keywords" content="E爱车 洗车 到店洗车" />
<meta name="description" content="E爱车" />
<link rel="shortcut icon" href="${ctx}/static/imges/favicon.ico" />
<title>门店详情</title>
<link rel="stylesheet" type="text/css" href="${ctx}/static/css/autoinn/bootstrap/bootstrap.min.css" />
<link rel="stylesheet" type="text/css" href="${ctx}/static/css/autoinn/font-awesome/css/font-awesome.min.css" />
<link rel="stylesheet" type="text/css" href="${ctx}/static/css/autoinn/slideNav.css" />
<link rel="stylesheet" type="text/css" href="${ctx}/static/css/autoinn/washCar.css" />
<style type="text/css">
			body{
				background-color: #f0efed;
			}
			
			.container{
				padding-left: 0px;
				padding-right: 0px;
			}
			
			.row{
				margin-left: 0px;
				margin-right: 0px;
			}
			
			.list-group-item:first-child{
				border-top-left-radius: 0px;
				border-top-right-radius: 0px;
			}
			
			.list-group-item:last-child{
				border-bottom-right-radius: 0px;
				border-bottom-left-radius: 0px;
			}
			
			.active a{
				color: #EF8A55;
			}
			
			a:hover{
				color: #919191;
				text-decoration: none;
			}
		</style>
	<script type="text/javascript" src="${ctx}/static/js/autoinn/jquery/jquery-1.7.min.js"></script>
	<script type="text/javascript" src="${ctx}/static/js/autoinn/bootstrap/bootstrap.min.js"></script>
	<script type="text/javascript" src="${ctx}/static/js/autoinn/jquery/jquery.raty.js"></script>
	
	</head>
<body>
	<div class="container">
			<div class="orange-orange-a row pf text-center f14 border-1 bdc-e6e6e6 bgc-f8f8f8 pt-5 pb-5 z99 w h45 line-height-35 pr" style="left: 0; top: 0;">
				<div class="col-xs-4 line-height-35 text-left pl-15 pr-0 pt-0">
					<a class="go-back f15 pa z99 pointer co8" style="left: 15px;">
						<i class="fa f20 fa-angle-left pr-3"></i>返回
					</a>
				</div>
				<div class="col-xs-4 pr-0 pl-0 text-center">${name }</div>
				
				
			
				<c:if test="${oi==null }">
				<div  class="col-xs-4 line-height-35 text-right">
			        <a id="ca" href="javascript:cloec()" class=" pt-10 pb-10 pl-20 pr-0 co8">
			            <i class="fa fa-star-o pr-3"></i>收藏
			        </a>
		   		 </div>
				
				</c:if>
				
				
			</div>

			<div class="row pt-40 pb-0">
				<div class="bgc-ffffff  carousel  mt-0 mb-10 pl-0 pr-0 mb-10  slide  mt-15  row">
						<!-- 商品图片 -->
						<div class="pt-0 mb-0 pl-0  pr-0 col-xs-12 ">
								<img class="w h200" src="${ ctx}/upload/${logo}">
						</div>
						<!-- 商品图片结束 -->
						<!-- 购买量开始 -->
						<div class="pt-10 pb-5 pr col-xs-6 pl-0 f16 text-center border-top border-right bdc-e6e6e6">
							<i class="pa fa fa-shopping-cart pt-3 pl-3 co1"></i>
							<span class="pl-25"><c:if test="${ding==null }">
							 0
							</c:if>
							${ding }
							</span><span>人购买过</span>
						</div>
						<!-- 购买量结束 -->
						<!-- 浏览量开始 -->
						<div class="pt-10 pb-5 pr col-xs-6 pl-0 f16 text-center border-top bdc-e6e6e6">
							<i class="pa fa fa-eye pt-3 pl-3 co1"></i>
							<span class="pl-25">${looknum }</span><span>人浏览过</span>
						</div>
						<!-- 浏览量结束 -->
						<!-- 营业时间开始 -->
						<div class="pt-10 pb-5 pr col-xs-6 pl-0 f16 text-center border-top border-right bdc-e6e6e6">
							<i class="pa fa fa-clock-o pt-3 pl-3 co1"></i>
							<span class="pl-25">09:00-18:00</span>
						</div>
						<!-- 营业时间结束 -->
						<!-- 联系方式开始 -->
						<div class="pt-10 pb-5 pr col-xs-6 pl-0 f16 text-center border-top bdc-e6e6e6">
							<i class="pa fa fa-phone pt-3 pl-3 co1"></i>
							<span class="pl-25"><a href="tel:${tel }" class="co1">${tel }</a></span>
						</div>
						<!-- 联系方式结束 -->
						<!-- 地理位置开始 -->
						<a class="co8" href="javascript:ref();">
							<div class="pt-10 mb-10 pr col-xs-12 pl-0 border-top bdc-e6e6e6 f16">
								<i class="pa fa fa-map-marker pt-3 pl-15  co1"></i>
								<div class="pl-30 pr-15 co1 f15">${address }</div>
								<span class="pa f20 fa fa-angle-right co3" style="top: 10px; right: 10px;"></span>
							</div>
						</a>
						<!-- 地理位置结束 -->
				</div>
				<!-- 评价 开始 -->
				<div>
					<ul class="list-group">
						<div class="list-group-item pl-5 pt-13 pb-13" onclick="window.location.href='${ctx}/weixin/f/autoinn/xc/ping?storeid=${storeid }';">
							<div class="row">
								<div class="col-xs-6 pl-5 pr-0 text-left ">
									<i class="pa fa fa-pencil-square-o pt-3 pl-3 co1"></i>
									<span class="pl-25">历史评价</span>
								</div>
								<div class="col-xs-6 pr-0 pl-0 text-right">
									<span id="jr_raty" class="mr-5 pt-2"></span>
									<span class="pa fa fa-angle-right co3 pt-2  f20"></span>
								</div>
							</div>
						</div>
					</ul>
				</div>
				<!-- 评价结束 -->
				<!-- 商品列表 -->
				<div class="bgc-ffffff mt-5 pl-0">
					<ul class="list-group">
					<!-- 商品开始 -->
					<c:forEach items="${p }" var="l" varStatus="idx">
					   <c:if test="${l.id==proid }">
						<div class="list-group-item pl-5 pt-13 pb-13 product-group">
								<div class="row">
									<div class="col-xs-6 pl-5 pr-0 text-left ">
										<input type="radio" class="product-item" value="${l.xprice }" name="product-group" checked="checked">
										<input type="hidden" class="yo" value="${l.id}"/> 
										<span class="f15 ml-3">${l.pathname }</span>
									</div>
									<div class="col-xs-6 pr-0 pl-0 text-right">
										<i class="fa fa-rmb f16 co2 fb"></i><span class="co2 f16 fb">${l.xprice }</span>
										<i class="fa fa-rmb line-through co3 f13"></i><span class="line-through co3 f13">${l.yprice}</span>
									</div>
								</div>
							</div>
							</c:if>
							<c:if test="${l.id != proid }">
							<div class="list-group-item pl-5 pt-13 pb-13 product-group">
								<div class="row">
									<div class="col-xs-6 pl-5 pr-0 text-left ">
									<input type="hidden" class="yo" value="${l.id}"/> 
										<input type="radio" class="product-item" value="${l.xprice }" name="product-group" > 
										<span class="f15 ml-3">${l.pathname }</span>
									</div>
									<div class="col-xs-6 pr-0 pl-0 text-right">
										<i class="fa fa-rmb f16 co2 fb"></i><span class="co2 f16 fb">${l.xprice }</span>
										<i class="fa fa-rmb line-through co3 f13"></i><span class="line-through co3 f13">${l.yprice}</span>
									</div>
								</div>
							</div>
							</c:if>
					</c:forEach>
					<!-- 商品结束 -->
				</div>

				<div class="row bgc-ffffff border-top bdc-e6e6e6 f14 mb-50">
					<div class="col-xs-12 pl-10 pt-10 pb-10 border-bottom bdc-ddd">
						<div class="fa fa-heart co15 mr-5"></div>
						温馨提示
					</div>
					<div class="col-xs-12 pl-10 pt-10 pb-10 co6">预约信息</div>
					<div class="col-xs-12 pl-10 pt-0 pb-0 f13">无需预约</div>
					<!--<div class="col-xs-12 pl-10 pt-10 pb-10 co6">使用规则</div>
					<div class="col-xs-12 pl-10 pt-0 pb-10 f13 border-bottom bdc-ddd">洗车后现场支付</div>-->
				</div>
			</div>
			
			<div class="orange-orange-a list-inline row mr-0 ml-0 mb-0 h30 w pf bgc-f8f8f8 border-1 bdc-e6e6e6" style="bottom: 0; left: 0;">
					<input type="hidden" id="sid" value="${storeid }"/>
			        <input type="hidden" id="fid" value="${proid }" />
			        <input type="hidden" id="pe" value=""/>
			        
			        <input  type="hidden" id="dlng" value="${lng }"/>
			        <input type="hidden" id="dlat" value="${lat }" />
					<button class="btn btn-lg btn-block btn-orange co3 get-more"  onClick="ding();">洗完付<span id="pay_price">${xprice }</span>元</button>
			</div>
		</div>
		<script type="text/javascript" src="${ctx}/static/js/autoinn/jquery/jquery.placeholder.js"></script>
		<script type="text/javascript" src="${ctx}/static/js/autoinn/common.js"></script>
		<script type="text/javascript" src="${ctx}/static/js/autoinn/washCar.js"></script>
		<script type="text/javascript">
            var PARENT_URL='wash_car.html'
                ERROR_MSG = '',
                SUCCESS_MSG = '',
                INFO_MSG = '',
                WARNING_MSG = '';
        </script>
		<script type="text/javascript">
		//隐藏微信分享按钮
		document.addEventListener("WeixinJSBridgeReady",
				function onBridgeReady(){
					WeixinJSBridge.call("hideOptionMenu")
				}
		);
		
		$(document).ready(function(){
		    // 点击整行选择商品
		    $('.product-group').bind('click', function(){
		        $('.product-item').attr('checked', false);
		        $(this).find('.product-item').attr('checked', true);
		        var price=$(this).find('.product-item').val();
		        
		        $('#pay_price').html(price);
		    });
		    
		    $('#jr_raty').raty({
		    	readOnly: true, 
		    	score: "${comment_val}",
		    	starOff : '${ctx}/static/images/star-off.png',
  				starOn  : '${ctx}/static/images/star-on.png'
  			});
		});
		
		function ding(){
	      
			var item = $('.product-item');
			var yo  = $('.yo');
			for(var i = 0;i<item.length;i++){
				if(item[i].checked==true){
					//alert(yo[i].value);
					 window.location.href='${ctx}/weixin/f/autoinn/xc/userpay/'+yo[i].value;
				}
			}
	    		 
	 
	    	
		}
		
		//收藏
		function cloec(){
			 $.post("${ctx}/weixin/f/autoinn/xc/collect/add",
		     		{
		                      "storeid" : $("#sid").val()
		     		},function(data){
		     			$("#ca").hide();
		     			alert(data.message);
		     			//window.location.href='${ctx}/weixin/f/autoinn/xc/collect';
		     		},"json");
		}
		
		function ref(){
			window.location.href="${ctx}/weixin/f/autoinn/xc/map?dlng="+$("#dlng").val()+"&&dlat="+$("#dlat").val();
		}
		</script>
		<script>
		var _hmt = _hmt || [];
		(function() {
		  var hm = document.createElement("script");
		  hm.src = "//hm.baidu.com/hm.js?3987c54e2c6d6c399fa4aca3fb9a7ef9";
		  var s = document.getElementsByTagName("script")[0]; 
		  s.parentNode.insertBefore(hm, s);
		})();
		</script>
	</body>
</html>
